package com.xquant.common.engine.xPP.request;

import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.apache.commons.lang.StringUtils;

import java.io.UnsupportedEncodingException;
import java.util.*;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class CalcPricingForm {
    private String cfgId;
    private String legId;
    private String peCode = "";
    public String calcPPCode;
    public double spotPrice;
    public String spotQuoteType;
    public Ir discount;
    public Ir dividend;
    public Ir volSurface;

    private List<UnderlyingPricingParam> underlyingPricingParams;
    private String princingMode;

    @Override
    public String toString() {
        return new StringJoiner(", ", CalcPricingForm.class.getSimpleName() + "[", "]")
                .add("cfgId='" + cfgId + "'")
                .add("legId='" + legId + "'")
                .add("peCode='" + peCode + "'")
                .add("calcPPCode='" + calcPPCode + "'")
                .add("spotPrice=" + spotPrice)
                .add("spotQuoteType='" + spotQuoteType + "'")
                .add("discount=" + discount)
                .add("dividend=" + dividend)
                .add("volSurface=" + volSurface)
                .add("underlyingPricingParams=" + underlyingPricingParams)
                .add("princingMode='" + princingMode + "'")
                .add("fixingType='" + fixingType + "'")
                .add("defaultCurve=" + defaultCurve)
                .add("control=" + control)
                .add("MarketNPV=" + MarketNPV)
                .toString();
    }

    private String fixingType;
    private Ir defaultCurve;
    private Control control;
    private double MarketNPV;

    public String getCfgId() {
        return cfgId;
    }

    public void setCfgId(String cfgId) {
        this.cfgId = cfgId;
    }

    public String getLegId() {
        return legId;
    }

    public void setLegId(String legId) {
        this.legId = legId;
    }

    public String getPeCode() {
        return peCode;
    }

    public void setPeCode(String peCode) {
        this.peCode = peCode;
    }

    public List<UnderlyingPricingParam> getUnderlyingPricingParams() {
        return underlyingPricingParams;
    }

    public void setUnderlyingPricingParams(List<UnderlyingPricingParam> underlyingPricingParams) {
        this.underlyingPricingParams = underlyingPricingParams;
    }

    public String getPrincingMode() {
        return princingMode;
    }

    public void setPrincingMode(String princingMode) {
        this.princingMode = princingMode;
    }

    public String getFixingType() {
        return fixingType;
    }

    public void setFixingType(String fixingType) {
        this.fixingType = fixingType;
    }

    public Ir getDefaultCurve() {
        return defaultCurve;
    }

    public void setDefaultCurve(Ir defaultCurve) {
        this.defaultCurve = defaultCurve;
    }

    public Control getControl() {
        return control;
    }

    public void setControl(Control control) {
        this.control = control;
    }

    public double getMarketNPV() {
        return MarketNPV;
    }

    public void setMarketNPV(double marketNPV) {
        MarketNPV = marketNPV;
    }

    public String getCalcPPCode() {
        return calcPPCode;
    }

    public void setCalcPPCode(String calcPPCode) {
        this.calcPPCode = calcPPCode;
    }

    public double getSpotPrice() {
        return spotPrice;
    }

    public void setSpotPrice(double spotPrice) {
        this.spotPrice = spotPrice;
    }

    public String getSpotQuoteType() {
        return spotQuoteType;
    }

    public void setSpotQuoteType(String spotQuoteType) {
        this.spotQuoteType = spotQuoteType;
    }

    public Ir getDiscount() {
        return discount;
    }

    public void setDiscount(Ir discount) {
        this.discount = discount;
    }

    public Ir getDividend() {
        return dividend;
    }

    public void setDividend(Ir dividend) {
        this.dividend = dividend;
    }

    public Ir getVolSurface() {
        return volSurface;
    }

    public void setVolSurface(Ir volSurface) {
        this.volSurface = volSurface;
    }
}
